package com.maze.game.model.base
{
	import flash.text.TextField;
	import flash.text.TextFormat;

	public class BaseExit extends Base
	{
		private var label:TextField;

		public function BaseExit(baseWidth:uint, baseHeight:uint)
		{
			super(baseWidth, baseHeight, BaseType.EXIT);
			init();
		}
		
		private function init():void
		{
			drawBackground();
			buildLabel();
		}
		
		private function buildLabel():void
		{
			if(label) return;
			label = new TextField();
			var textFormat:TextFormat = new TextFormat();
			textFormat.font = "Arial";
			textFormat.bold = true;
			label.text = "2";
			label.setTextFormat(textFormat);
			addChild(label);
			label.x = baseWidth/2 - label.textWidth/2-2;
			label.y = baseHeight/2 - label.textHeight/2-2;
		}
	}
}